﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<CarHelpDesk.Web.Models.Tag>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Етикети
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Етикети</h2>
    
    <% if (Context.User.IsInRole("MegaModerator"))
       {%>
      <%= Html.ActionLink("Редактирай списъка с етикети", "List")%>
      <%} %>

    
        <table id="tagsList" width="100%">
        <tr>
    <% int cnt = 0;
        foreach (var item in Model) {
            
            if (cnt % 5 == 0 ){ %>
             </tr><tr>
            <% }cnt++;%>
            <td >
           <a href="../../Questions/IndexTag/<%= Html.Encode(item.Title) %>" >
             <span id="tagSpan"><%= Html.Encode(item.Title) %></span> </a>
             X <%= Html.Encode(item.QuestionTags.Count()) %>
            </td>    
    <% } %>
</tr>
    </table>
    



</asp:Content>

